<template>
  <div>
    当前页：{{ page }}
    <hr>
    <button @click="page--">上一页</button>
    <button @click="page++">下一页</button>
  </div>
</template>

<script setup>
import { ref, watch } from 'vue';

const page = ref(1);

watch(page,(nval,oval)=>{
  console.log(nval,oval);
})
</script>

<style lang="scss" scoped>

</style>